﻿@model Core.Models.RegisterModel

@{
    ViewBag.Title = "Register";
    Layout = ((Core.Models.Theme)Session["Theme"]).Layout;
}

<h2>Register a New Account</h2>
<br />
@{
    if (Model.RegistrationView == 1)
    {
        using (Html.BeginForm())
        {
        @Html.HiddenFor(m => m.RegistrationView)
        @Html.ValidationSummary(false)
        @Html.HiddenFor(m => m.BusinessUnitId)
        @Html.HiddenFor(m => m.Password)
        @Html.HiddenFor(m => m.ConfirmPassword)
        @Html.HiddenFor(m => m.SecurityQuestion)
        @Html.HiddenFor(m => m.SecurityAnswer)
        <fieldset>
            <legend>Invitation Information</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.InviteCode)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.InviteCode)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.UseOpenId)
            </div>
            <div class="editor-field">
            @Html.RadioButtonFor(m => m.UseOpenId, true) I would like to setup my account using OpenID. Providers include OpenID, Google, Yahoo, MySpace, AOL to name a few.
            </div>
            <div class="editor-field">
            @Html.RadioButtonFor(m => m.UseOpenId, false) I would like to setup my account with email & password.
            </div>

            <div class="editor-field">
                <br />
                <input type="submit" value="Continue" />
            </div>
        </fieldset>    
        }
    }
    if (Model.RegistrationView == 2)
    {
        <script type="text/javascript" src="@Url.Content("/Scripts/jquery.openid.js")"></script>
        using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @id = "openidform", @class = "openid" }))
        {
            @Html.HiddenFor(m => m.RegistrationView)
            @Html.HiddenFor(m => m.BusinessUnitId)
            @Html.HiddenFor(m => m.Email)
            @Html.HiddenFor(m => m.InviteCode)
            @Html.HiddenFor(m => m.UseOpenId)
            @Html.HiddenFor(m => m.Password)
            @Html.HiddenFor(m => m.ConfirmPassword)
            @Html.HiddenFor(m => m.SecurityQuestion)
            @Html.HiddenFor(m => m.SecurityAnswer)
            <div style="float: left">
                <p style="font-size: large; font-weight:bold;">Using OpenID</p>
                <div><ul class="providers"> 
                <li class="openid" title="OpenID"><img src="/Content/Images/openidW.png" alt="icon" /> 
                <span><strong>http://{your-openid-url}</strong></span></li> 
                <li class="direct" title="Google"> 
	                <img src="/Content/Images/googleW.png" alt="icon" /><span>https://www.google.com/accounts/o8/id</span></li> 
                <li class="direct" title="Yahoo"> 
	                <img src="/Content/Images/yahooW.png" alt="icon" /><span>http://yahoo.com/</span></li> 
                <li class="username" title="AOL screen name"> 
	                <img src="/Content/Images/aolW.png" alt="icon" /><span>http://openid.aol.com/<strong>username</strong></span></li> 
                <li class="username" title="MyOpenID user name"> 
	                <img src="/Content/Images/myopenid.png" alt="icon" /><span>http://<strong>username</strong>.myopenid.com/</span></li> 
                <li class="username" title="Flickr user name"> 
	                <img src="/Content/Images/flickr.png" alt="icon" /><span>http://flickr.com/<strong>username</strong>/</span></li> 
                <li class="username" title="Technorati user name"> 
	                <img src="/Content/Images/technorati.png" alt="icon" /><span>http://technorati.com/people/technorati/<strong>username</strong>/</span></li> 
                <li class="username" title="Wordpress blog name"> 
	                <img src="/Content/Images/wordpress.png" alt="icon" /><span>http://<strong>username</strong>.wordpress.com</span></li> 
                <li class="username" title="Blogger blog name"> 
	                <img src="/Content/Images/blogger.png" alt="icon" /><span>http://<strong>username</strong>.blogspot.com/</span></li> 
                <li class="username" title="LiveJournal blog name"> 
	                <img src="/Content/Images/livejournal.png" alt="icon" /><span>http://<strong>username</strong>.livejournal.com</span></li> 
                <li class="username" title="ClaimID user name"> 
	                <img src="/Content/Images/claimid.png" alt="icon" /><span>http://claimid.com/<strong>username</strong></span></li> 
                <li class="username" title="Vidoop user name"> 
	                <img src="/Content/Images/vidoop.png" alt="icon" /><span>http://<strong>username</strong>.myvidoop.com/</span></li> 
                <li class="username" title="Verisign user name"> 
	                <img src="/Content/Images/verisign.png" alt="icon" /><span>http://<strong>username</strong>.pip.verisignlabs.com/</span></li> 
                </ul></div> 
                <fieldset>
                <label for="openid_username">Enter your <span>Provider user name</span></label> 
                <div>
                    <span></span><input type="text" name="openid_username" /> 
                    <input type="submit" name="logon1" value="Log On" />
                </div>
                </fieldset> 
                <fieldset> 
                <label for="openid_identifier">Enter your <a class="openid_logo" href="http://openid.net">OpenID</a></label> 
                <div class="editor-field">
                    @Html.TextBoxFor(m => m.openid_identifier)
                    @Html.ValidationMessageFor(m => m.openid_identifier)
                    <input type="submit" name="logon3" value="Log On" />
                </div>
                </fieldset>
            </div>        
        }
        <script type="text/javascript">
            $(function () {
                $("#openidform").openid();
            });
        </script>
    }
    if (Model.RegistrationView == 3)
    {
        using (Html.BeginForm())
        {
        @Html.ValidationSummary(false)
        @Html.HiddenFor(m => m.RegistrationView)
        @Html.HiddenFor(m => m.BusinessUnitId)
        @Html.HiddenFor(m => m.Email)
        @Html.HiddenFor(m => m.InviteCode)
        @Html.HiddenFor(m => m.UseOpenId)
        @:Passwords are required to be a minimum of @ViewBag.PasswordLength characters in length.
        <fieldset>
            <legend>Security Information</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.SecurityQuestion)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.SecurityQuestion)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.SecurityAnswer)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.SecurityAnswer)
            </div>
            <br />
            <input type="submit" value="Register" />
        </fieldset>
        }
    }
}
